package com.tis.database.entitys.security;

// Generated Aug 27, 2013 11:48:51 PM by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.tis.database.dao.ClsInstance;

/**
 * AdUserGroup generated by hbm2java
 */
@Entity
@Table(name=ClsInstance.INTERFACE_SCHEMA + ClsInstance.POINTER + "AD_USER_GROUP")
@NamedQueries({
    @NamedQuery(name = AdUserGroup.findAll, query = "FROM AdUserGroup c "),
    @NamedQuery(name = AdUserGroup.findById, query = "FROM AdUserGroup c WHERE  c.pkId = :pkId ")
    })
public class AdUserGroup implements java.io.Serializable {
	private static final long serialVersionUID = 1L;

	@Transient
	public static final String findAll = "AdUserGroup_findAll";
	@Transient
	public static final String findById = "AdUserGroup_findById";
	
	@Id
	@GeneratedValue
	@Column(name = "AD_USER_GROUP_ID", unique = true, nullable = false, precision = 20, scale = 0)
	private BigDecimal pkId;
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "adUserGroup")
	private List<AdUserLogin> adUserLogins;	
	
	@Column(name = "VERSION", length = 500)
	private String version;
	
	@Column(name = "CODE", length = 1000)
	private String code;
	
	@Column(name = "NAME", length = 1000)
	private String name;
	
	@Column(name = "DESCRIPTION", length = 2000)
	private String description;
	
	@Column(name = "DESCRIPTION_ALTERNATE", length = 2000)
	private String descriptionAlternate;
	
	@Column(name = "AD_ACTIVE_DIRECTORY_ID", precision = 20, scale = 0)
	private BigDecimal adActiveDirectoryId;
	
	@Column(name = "ISACTIVE", length = 1)
	private String isactive;
	
	@Column(name = "ISDELETED", length = 1)
	private String isdeleted;
	
	@Column(name = "STATUS", length = 100)
	private String status;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATED_ON")
	private Date createdOn;
	
	@Column(name = "CREATED_BY", length = 500)	
	private String createdBy;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATED_ON")
	private Date updatedOn;
	
	@Column(name = "UPDATED_BY", length = 500)
	private String updatedBy;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DELETED_ON")
	private Date deletedOn;
	
	@Column(name = "DELETED_BY", length = 500)
	private String deletedBy;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FIRST_ACCESS")
	private Date firstAccess;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LASTED_ACCESS")
	private Date lastedAccess;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EXPIRED_DATE")
	private Date expiredDate;
	
	@Column(name = "LASTED_IP_ACCESS", length = 500)
	private String lastedIpAccess;
	
	@Column(name = "LASTED_COMP_ACCESS", length = 500)
	private String lastedCompAccess;
	
	

	@Override
	public String toString()
	{
		return ToStringBuilder.reflectionToString(this);
	}
	
	public AdUserGroup() {
	}

	public AdUserGroup(BigDecimal pkId) {
		this.pkId = pkId;
	}

	public AdUserGroup(BigDecimal pkId, String code, String name,
			String description, String descriptionAlternate,
			BigDecimal adActiveDirectoryId, String isactive, String isdeleted,
			String status, Date createdOn, String createdBy, Date updatedOn,
			String updatedBy, Date deletedOn, String deletedBy,
			Date firstAccess, Date lastedAccess, Date expiredDate,
			String lastedIpAccess, String lastedCompAccess, List<AdUserLogin> adUserLogins) {
		this.pkId = pkId;
		this.code = code;
		this.name = name;
		this.description = description;
		this.descriptionAlternate = descriptionAlternate;
		this.adActiveDirectoryId = adActiveDirectoryId;
		this.isactive = isactive;
		this.isdeleted = isdeleted;
		this.status = status;
		this.createdOn = createdOn;
		this.createdBy = createdBy;
		this.updatedOn = updatedOn;
		this.updatedBy = updatedBy;
		this.deletedOn = deletedOn;
		this.deletedBy = deletedBy;
		this.firstAccess = firstAccess;
		this.lastedAccess = lastedAccess;
		this.expiredDate = expiredDate;
		this.lastedIpAccess = lastedIpAccess;
		this.lastedCompAccess = lastedCompAccess;
		this.adUserLogins = adUserLogins;
	}
	

	/**
	 * @return the pkId
	 */
	public BigDecimal getPkId() {
		return pkId;
	}

	/**
	 * @param pkId the pkId to set
	 */
	public void setPkId(BigDecimal pkId) {
		this.pkId = pkId;
	}
	
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getDescriptionAlternate() {
		return this.descriptionAlternate;
	}

	public void setDescriptionAlternate(String descriptionAlternate) {
		this.descriptionAlternate = descriptionAlternate;
	}

	public BigDecimal getAdActiveDirectoryId() {
		return this.adActiveDirectoryId;
	}

	public void setAdActiveDirectoryId(BigDecimal adActiveDirectoryId) {
		this.adActiveDirectoryId = adActiveDirectoryId;
	}
	
	public String getIsactive() {
		return this.isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}

	public String getIsdeleted() {
		return this.isdeleted;
	}

	public void setIsdeleted(String isdeleted) {
		this.isdeleted = isdeleted;
	}
	
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}
	
	public Date getUpdatedOn() {
		return this.updatedOn;
	}

	public void setUpdatedOn(Date updatedOn) {
		this.updatedOn = updatedOn;
	}
	
	public String getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getDeletedOn() {
		return this.deletedOn;
	}

	public void setDeletedOn(Date deletedOn) {
		this.deletedOn = deletedOn;
	}

	public String getDeletedBy() {
		return this.deletedBy;
	}

	public void setDeletedBy(String deletedBy) {
		this.deletedBy = deletedBy;
	}

	public Date getFirstAccess() {
		return this.firstAccess;
	}

	public void setFirstAccess(Date firstAccess) {
		this.firstAccess = firstAccess;
	}

	public Date getLastedAccess() {
		return this.lastedAccess;
	}

	public void setLastedAccess(Date lastedAccess) {
		this.lastedAccess = lastedAccess;
	}

	public Date getExpiredDate() {
		return this.expiredDate;
	}

	public void setExpiredDate(Date expiredDate) {
		this.expiredDate = expiredDate;
	}

	public String getLastedIpAccess() {
		return this.lastedIpAccess;
	}

	public void setLastedIpAccess(String lastedIpAccess) {
		this.lastedIpAccess = lastedIpAccess;
	}

	public String getLastedCompAccess() {
		return this.lastedCompAccess;
	}

	public void setLastedCompAccess(String lastedCompAccess) {
		this.lastedCompAccess = lastedCompAccess;
	}
	
	public List<AdUserLogin> getAdUserLogins() {
		return this.adUserLogins;
	}

	public void setAdUserLogins(List<AdUserLogin> adUserLogins) {
		this.adUserLogins = adUserLogins;
	}

}
